<template>
    <el-select v-model="currentValue"
               @change="onChange"
               :disabled="disabled"
               :multiple="multiple"
               :collapse-tags="collapseTags"
               placeholder="终端类型">
        <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value">
        </el-option>
    </el-select>
</template>

<script>

    /**
     * 模块类型
     */

    export default {
        mounted() {

        },
        props: {
            value: {
                required: true
            },
            disabled: {
                default: false
            },
            multiple: {
                default: false
            },
            collapseTags: {
                default: false
            },
        },
        data() {
            return {
                options : this.$store.state.viewWidgetSceneEnum,
                currentValue: this.value
            }
        },
        methods: {
            onChange: function (val) {
                this.$emit('input', val);
            }
        },
        watch: {
            value: function (val, oldVal) {
                this.currentValue = val;
            }
        }

    };

</script>

<style scoped>

</style>
